#ifndef STACKC_H_INCLUDED
#define STACKC_H_INCLUDED
#include <stdio.h>
#include<malloc.h>
#include<stdlib.h>
typedef int ElementType;

void runstackdemo();

//定义节点
typedef struct Node {
        ElementType element;
        struct Node *next;
}NODE, *PNODE;

//定义结构提
typedef struct Stack{
        PNODE PTOP; //定义栈节点
        PNODE PBOTTOM;//定义栈底节点
}STACK, *PSTACK;

//函数声明
void initStack(PSTACK Stack);//初始化栈
void pushStack(PSTACK Stack, int val);//入栈函数
void popStack(PSTACK Stack, int *val);//出栈函数
void traverseStack(PSTACK Stack);//遍历栈函数
bool IsEmpty(PSTACK Stack);//判断栈是否为空
void clearStack(PSTACK Stack);//清空栈函数





#endif // STACKC_H_INCLUDED
